import request from '@/utils/request'
const apiUrl = '/order'

export function getOrderList(params) {
  return request({
    url: apiUrl,
    method: 'get',
    params
  }).then(res => {
    return res.data
  })
}

export function getOrderInfo(id) {
  return request({
    url: apiUrl + '/' + id,
    method: 'get'
  }).then(res => {
    return res.data
  })
}

export function getOrderPackageList(params) {
  return request({
    url: apiUrl + '-package',
    method: 'get',
    params
  }).then(res => {
    return res.data
  })
}

export function getOrderPackageInfo(id) {
  return request({
    url: apiUrl + '-package-info/' + id,
    method: 'get'
  }).then(res => {
    return res.data
  })
}

export function getOrderCurrentPackageInfo() {
  return request({
    url: apiUrl + '-current-package-info',
    method: 'get'
  }).then(res => {
    return res.data
  })
}
